<template>
  <div id="app">
    <img src="./assets/logo.png">
    <span>这是数值{{countNumber}}</span>
    <el-button type="primary" @click="addOne">点击进行加1</el-button>
    <router-view/>
  </div>
</template>

<script>
  import {mapGetters} from 'vuex'

  export default {
    name: 'App',
    computed: {
      ...mapGetters(['countNumber'])
    },
    methods: {
      addOne() {
        this.$store.commit('incrementNumber')
      }
    }
  }
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
